package com.lyy.bigevent.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.groups.Default;
import lombok.Data;

import java.time.LocalDateTime;
@Data
public class Category {
    @NotNull(groups = Update.class)
    private Integer id;
    @NotEmpty/*(groups = {Add.class, Update.class})*/
    private String categoryName;
    @NotEmpty/*(groups = {Add.class, Update.class})*/
    private String categoryAlias;
    private Integer createUser;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

//    public interface Add {
//    }
//    public interface Update {
//    }

    public interface Add extends Default {
    }
    public interface Update extends  Default{
    }
}
